<style>
.formcheck,.ketqua{
    width:435px;
    padding:10px;
    margin:10px;
    border:1px solid #cacaca
}
.formcheck textarea{
    width:400px;
    height:250px
}
.ketqua{
    color:#0EF922;
}
.ketqua span{
    color:red;
}
.formcheck{width:95%;}
#acct table{width:800px;}
.formcheck textarea{margin:10px 100px;height:70px;}
.formcheck  input{margin:10px 100px;}
</style>

<div class="offerbanner clearfix">
    <div class="mota">
        <div class="img_list_group">
            Check point
        </div>
    </div> 
           
    <div class="left formcheck" id="acct">
        <form method="post" action="" id="checkip">
            <textarea name="ip"></textarea><br />
            <input type="submit" value="Check"/>
        </form>
        <table>
        <tr>
            <th>stt</th>
            <th>Username</th>
            <th>Total</th>
            <th>Curent</th>
            <th>Pending</th> 
            <th>Offer</th> 
            <th>Edit</th>           
        </tr>
        
        
        
        
<?php
if(!empty($user)){
    $i=0;
    foreach($user as $user){
        $i++;
        echo '
        <tr>
            <td>'.$i.'</td>
            <td>'.$user->username.'</td>
            <td>'.$user->total.'</td>
            <td>'.$user->curent.'</td>
            <td>'.$user->pending.'</td>
            <td>';
            if(!empty($credit[$user->id])){
                foreach($credit[$user->id] as $diem){
                    
                    echo '<a href="'.base_url().'mod_check/delcredit/'.$diem->id.'">';
                    echo '<img src="'.base_url().'temp/admin/images/del.png"/>';
                    echo '</a>';
                    echo '<span style="font-weight:bold;font-size:12px;">'.$diem->name. '</span> (<span style="color:#fe5839;"> '.$diem->point.'</span> )<span style="font-weight:normal;font-size:11px;"> ( ' .date("d m Y - h:i:s A",$diem->created).'  )</span>';
                    
                    echo '<br/>';
                }
            }
            
            echo 
            '</td>
            <td><a href="'.base_url().'mod_check/edituser/'.$user->id.'"><img src="'.base_url().'temp/admin/images/edit.png"/></a></td>
        </tr>
        ';
    }
}

?>
    
</table>
    </div>
    
    

</div>


